import request from '@/utils/request';

export async function getTeamByPage(params: any) {
  return request('/api/project/getTeamByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addTeam(params: any) {
  return request('/api/project/addTeam', {
    method: 'POST',
    data: params,
  });
}

export async function updateTeam(params: any) {
  return request('/api/project/updateTeam', {
    method: 'POST',
    data: params,
  });
}

export async function delTeam(params: any) {
  return request('/api/project/delTeam', {
    method: 'POST',
    data: params,
  });
}

export async function getProjectName(params: any) {
  return request('/api/project/getProjectInfoSimp', {
    method: 'POST',
  });
}

export async function exportTeam(params: any) {
  return request('/api/project/exportTeam', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}
export default { getTeamByPage, addTeam, updateTeam, delTeam, exportTeam, getProjectName };
